package com.zxh.zhenxihuan.mapper;


import com.zxh.zhenxihuan.entity.Goods;
import com.zxh.zhenxihuan.entity.z.Address;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author:geQiang
 * @version:1.0
 * @date:2019/8/8
 * @description:com.zxh.zhenxihuan.mapper
 */
@Mapper
public interface AddressMapper {
    /**
     * 获得总数
     */
    @Select(" select count(1) from address")
    Integer getSum(@Param("uid") String uid);
    /**
     * 查询列表
     */
//    @Select("select * from address limit #{start},#{end} ")
    List<Address> getAddress(@Param("start") Integer start, @Param("end") Integer end,
                             @Param("uid") String uid);
    /**
     * 删除用户
     */
    @Delete("delete from address where id= #{id} ")
    Integer del(Integer id);

    Long add(Address address);

}
